package com.etone.smartAudit.enums;

import lombok.Getter;

/**
 * @author: sovy
 * @date: 2020/8/28
 * @description:
 */
public enum UseState {
    NOT_ONLINE("未上线"),
    USED("在用"),
    OFFLINE("下线");
    @Getter
    private String value;

    UseState(String value) {
        this.value = value;
    }

    public static UseState getByValue(String value) {
        if (value == null) {
            return null;
        }
        UseState[] values = UseState.values();
        for (int i = 0; i < values.length; i++) {
            if (value.equals(values[i].getValue())) {
                return values[i];
            }
        }
        return null;
    }
}
